package com.emergency.examine.domain;

import com.emergency.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;

//试卷题目表
@Entity
@Table(name = "ex_paper_question")
public class PaperQuestion extends BaseEntity {
    @JsonIgnore
    @OneToOne(targetEntity = Paper.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "paper_id", referencedColumnName = "id")
    private Paper paper; //试卷id(试题表)

    @OneToOne(targetEntity = Question.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "question_id", referencedColumnName = "id")
    private Question question; //题目id(题目表)

    private Integer seq;//试卷中题目序号

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }
}
